<html>
<head>
    <meta charset="utf-8" />
</head>
<body>
<script src="../assets/js/jquery-2.1.4.min.js"></script>
<form enctype="multipart/form-data" action="/upload" id="fileupload" method="post">
    <input type="file" id="file" name="file" onchange="addit()"/>
    <input type="hidden" name="which" value="2"/>
</form>
<script>
    function addit()
    {
        $("#button2",window.parent.document).text("正在上传中....");
        $("#fileupload").submit();
    }
</script>
</body>
</html>